package com.sf.eos.cx.wxapp.api.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.sf.eos.cx.skeleon.domain.UserInfo;
import com.sf.eos.cx.skeleon.service.user.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/")
    public String index(){

        UserInfo userInfo = userService.getUserInfo();
        return JSONObject.toJSONString(userInfo);
    }
}
